package com.sanyang.pda.utils;

import android.content.Context;

import com.wangshen.projectbase.R;

public class Utils {
    public static String getUnit(int unit) {
        String unitString;
        switch (unit) {
            case 10:
                unitString = "个";
                break;
            case 20:
                unitString = "只";
                break;
            case 30:
                unitString = "支";
                break;
            case 40:
                unitString = "件";
                break;
            case 50:
                unitString = "台";
                break;
            case 60:
                unitString = "根";
                break;
            case 70:
                unitString = "块";
                break;

            case 80:
                unitString = "双";
                break;
            case 90:
                unitString = "把";
                break;
            case 100:
                unitString = "张";
                break;
            case 110:
                unitString = "套";
                break;
            case 120:
                unitString = "卷";
                break;
            case 130:
                unitString = "瓶";
                break;
            case 140:
                unitString = "片";
                break;
            case 150:
                unitString = "副";
                break;
            case 160:
                unitString = "付";
                break;
            case 170:
                unitString = "樘";
                break;

            case 180:
                unitString = "顶";
                break;
            case 190:
                unitString = "辆";
                break;
            case 200:
                unitString = "桶";
                break;
            case 210:
                unitString = "箱";
                break;
            case 220:
                unitString = "袋";
                break;
            case 230:
                unitString = "米";
                break;
            case 240:
                unitString = "升";
                break;
            case 250:
                unitString = "毫升";
                break;
            case 260:
                unitString = "立方米";
                break;
            case 270:
                unitString = "吨";
                break;

            case 280:
                unitString = "千克";
                break;
            case 290:
                unitString = "克";
                break;
            case 300:
                unitString = "纸板箱";
                break;
            case 310:
                unitString = "平方组";
                break;
            default:
                unitString = "其他";
                break;

        }

        return unitString;
    }
    public static String getPackUnit(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content= context.getResources().getString(R.string.bundle);
                break;
            case 20:
                content= context.getResources().getString(R.string.box);
                break;
            default:
                content= context.getResources().getString(R.string.other);
                break;
        }
        return content;
    }
    public static String getArticleUnit(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content= context.getResources().getString(R.string.piece);
                break;
            case 20:
                content= context.getResources().getString(R.string.bag);
                break;
            default:
                content= context.getResources().getString(R.string.other);
                break;
        }
        return content;
    }
    public static String getCarryUp(int carryUp) {
        String cString;
        switch (carryUp) {
            case 10:
                cString = "待上架";
                break;
            case 20:
                cString = "已呼叫AGV";
                break;
            case 30:
                cString = "搬运中";
                break;
            case 40:
                cString = "已上架";
                break;
            case 90:
                cString = "运输异常";
                break;
            default:
                cString = "其他";
        }
        return cString;
    }

    public static String getCarryDown(int carryDown) {
        String cd;
        switch (carryDown) {
            case 10:
                cd = "申请领料";
                break;
            case 20:
                cd = "确认数量";
                break;
            case 30:
                cd = "推荐库位";
                break;
            case 40:
                cd = "物料下架";
                break;
            case 50:
                cd = "扫码拣货";
                break;
            case 60:
                cd = "领料签字";
                break;
            case 70:
                cd = "余料回库";
                break;
            case 75:
                cd = "托盘回收";
                break;
            case 80:
                cd = "打印标签";
                break;
            case 90:
                cd = "出库登记";
                break;
            case 990:
                cd = "已完成";
                break;
            case 999:
                cd = "已撤销";
                break;
            default:
                cd = "";
        }
        return cd;
    }
    public static String getDeliveryStatus(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content=context.getResources().getString(R.string.daixiajia);
                break;
            case 20:
                content=context.getResources().getString(R.string.yixiajia);
                break;
            case 30:
                content=context.getResources().getString(R.string.daichailing);
                break;
            case 40:
                content=context.getResources().getString(R.string.yichailing);
                break;
            case 50:
                content=context.getResources().getString(R.string.yihuiku);
                break;
            case 60:
                content=context.getResources().getString(R.string.daijianxuan);
                break;
            case 70:
                content=context.getResources().getString(R.string.yijianxuan);
                break;
        }
        return content;
    }
    public static String getExpressSpec(int sepc){
        String content="";
        switch (sepc){
            case 10:
                content="特小";
                break;
            case 20:
                content="小";
                break;
            case 30:
                content="中";
                break;
            case 40:
                content="大";
                break;
            case 50:
                content="特大";
                break;
        }
        return content;
    }
    public static String getTaskState(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content=context.getResources().getString(R.string.waiting_start);
                break;
            case 20:
                content=context.getResources().getString(R.string.pankuzhong);
                break;
            case 30:
                content=context.getResources().getString(R.string.to_summarize);
                break;
            case 900:
                content=context.getResources().getString(R.string.completed);
                break;
            case 999:
                content=context.getResources().getString(R.string.yizuofei);
                break;
        }
        return content;
    }
    public static String getStockState(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content=context.getResources().getString(R.string.normal);
                break;
            case 20:
                content=context.getResources().getString(R.string.rukuzhong);
                break;
            case 30:
                content=context.getResources().getString(R.string.chukuzhong);
                break;
            case 40:
                content=context.getResources().getString(R.string.yishangjia);
                break;
            case 50:
                content=context.getResources().getString(R.string.yixiajia);
                break;
            case 60:
                content=context.getResources().getString(R.string.jianhuowanbi);
                break;
        }
        return content;
    }
    public static String getTakeStockState(Context context,int type){
        String content="";
        switch (type){
            case 10:
                content=context.getResources().getString(R.string.daipandian);
                break;
            case 20:
                content=context.getResources().getString(R.string.normal);
                break;
            case 30:
                content=context.getResources().getString(R.string.panying);
                break;
            case 40:
                content=context.getResources().getString(R.string.pankui);
                break;
            case 50:
                content=context.getResources().getString(R.string.bupandian);
                break;
        }
        return content;
    }
}
